package cn.com.zonesion.rfidV2;

/**
 * @Author yjl
 * @create 2021/6/29 10:40
 */
public class  Cardutil {

    public static void clearbytes(byte[] bytes){
        for(int i = 0; i < bytes.length ; i++){
            bytes[i] = 0;
        }
    }


    public static String hex2String(byte[] bytes){
        StringBuffer  buffer = new StringBuffer();
        String temp = "";
        for (int i = 0 ; i < bytes.length; i++){
            temp = Integer.toHexString(bytes[i] & 0xFF);
            if(temp.length()  == 1){
                buffer.append("0");
            }

            buffer.append( temp + " ");
        }

        return  buffer.toString().toUpperCase();

    }

    /**输出Array**/
    public static String outByteArray(byte[] bytes){

        return hex2String(bytes);

    }

}
